In conventional computing systems, a frame buffer is provided in the system's hardware which is used to store the contents of the display of the computing system at any given time. The term “frame buffer”, as used herein, refers to the entire video display interface including acceleration hardware and other components as appropriate. The frame buffer is traditionally controlled and manipulated by a software program which regulates access to the display as requested by various application programs running on the computing system. For example, in a computing system utilizing the X Windows display protocol, an 8 bit frame buffer can be provided in the computer's hardware and controlled through the X Windows application program interface. The X Windows protocol permits a number of programs, known as X clients, to communicate with the interface, known as the X server, and thus modify the viewable display.
Conventionally, an 8 bit frame buffer can display up to 256 different colors typically from a palette of 224 (or 16,777,216) colors. Each of the 256 colors can be designated and selected by a X client, through a color lookup table known as a “colormap.” A conventional colormap for an 8 bit frame buffer has 256 (28) addressable entries or cells, each cell representing a “pixel” value defining a color displayable on the display. FIG. 1 shows an example of a colormap, having 256 cells. Each cell contains a multi-bit field which, among other things, dictates the color associated with the cell, and whether the cell is a read-only cell or a read/write cell. By default, the colormap cells are considered “empty” until allocated and initialized by the server at the request of an X client. The color of an empty cell is undefined. The operation of a colormap and the X Windows protocol is described in “The Xlib Programming Manual”, by O'Reilly and Associates Inc. publishers, 1988 (ISBN 0-937175-13-7), which is hereby expressly incorporated by reference in its entirety.
The application programs (i.e., the X clients) running on the computing system manipulate the cells in a colormap through the X server interface, and the frame buffer hardware accesses the cells in the colormap to determine the color of any pixel displayed. The mechanism typically takes this form: the client may request that a specific color be made available to it by allocating an entry in the default colormap. The X server will attempt to satisfy the request but may refuse if there are no unallocated cells available. At this point, the client has several options: for example, it may try to allocate a different color, ignore the error and assume that the request succeeded, or exit with an error. Alternatively, it may create a “private colormap” which gives the client a full set of 256 cells that are not shared with any other client.
In conventional computing systems, a display or colormap “flashing” problem occurs if the display hardware of the computing system is equipped with a frame buffer capable of accessing only a single hardware colormap at any one time. For example, Sun Microsystems' CG6 frame buffer hardware, or the GX hardware, is an 8 bit frame buffer which supports only one colormap at any one time. As the user moves between a client that uses the default colormap and one that has defined a private colormap, the X server automatically updates the values in the frame buffer's hardware colormap.
For example, the default colormap may have used cells 0 and 1 to display black and white. But the private colormap may have entirely different R, G, B values, and thus colors, in these locations.
When the default colormap switches out, the private colormap values are applied to all of the displayed color images and windows, with the result that windows and images displayed in on the screen may appear to be abnormally or seemingly randomly colored since these images relied upon the values stored in the default colormap. The image associated with the X client which allocated the private colormap will, of course, appear as it should, since it is now using the colors from the private colormap. If the user then activates a window which relies on the default colormap, the default colormap is then applied to all images and the image associate with the private colormap will then appear to be abnormally or randomly colored. This problem is referred to herein variously as “display flashing”, “colormap flashing”, or simply “flashing”.
What is needed is a method and computer program product for reducing display flashing in a computing system where the display hardware of the computing system is equipped with a frame buffer capable of accessing only a single hardware colormap at any one time. The system and method should operate transparently with respect to legacy software applications, and should not require any changes to the hardware of the computing system or display devices. It with this background in mind that the present invention was developed.